import { Entity, PrimaryUuid, Unique, Boolean, WxMGroupId, SysResource } from '@sker/core'
@Entity({
    name: 'wx_hasura'
})
@Unique('UK_WX_HASURA_GROUP_RESOURCE', ['group_id', 'resource'])
export class WxHasura {
    static title: string = `Hasura权限`;
    static resource: string = `wx_hasura`;

    @PrimaryUuid({
        primaryKeyConstraintName: 'PK_WX_HASURA_ID'
    })
    id!: string;

    @WxMGroupId({ comment: '会员组' })
    group_id!: string;

    @SysResource({ comment: '资源' })
    resource!: string;

    @Boolean({ comment: '增加' })
    can_insert!: boolean;

    @Boolean({ comment: '更新' })
    can_update!: boolean;

    @Boolean({ comment: '删除' })
    can_delete!: boolean;

    @Boolean({ comment: '查看' })
    can_select!: boolean;
}